/**
 * driver class for the project
 * 
 * make the connection to the database
 * start up GUI
 *
 */

package source;

import java.util.List;

import activejdbc.Base;

//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;

public class Main {

	/* main method */
	public static void main(String[] args) {
		Base.close();
		// start the connection to the database server 
		Base.open("com.mysql.jdbc.Driver",
				"jdbc:mysql://chromiumblue.net/2340", "teamteamwork",
				"YDmNT8umyYBemwfn");	
		
		System.out.println("Testing Patient");
		Patient p = (Patient)Patient.findFirst("username = ?", "Jeffrey");
		p.addAllergy("Shellfish");
		List<Allergy> l = p.getAllergies();
		System.out.println(l.get(0));
		System.out.println("Created Patient");
		
		//Create a JWindow
		Window myWindow = new Window();
		//Set JWindow size  
		myWindow.setSize(540,560);  
		//Make JWindow visible 
		
		
		myWindow.setVisible(true);
	}

}
